import request from '../utils/request';

export async function create(body) {
  return request('/api/procure/create', {
    method: 'POST',
    body
  });
}

export async function findOne(body) {
  return request('/api/procure/find', {
    method: 'POST',
    body
  });
}

export async function findMany(body) {
  return request('/api/procure/find/many', {
    method: 'POST',
    body
  });
}

export async function findStatistic(body) {
  return request('/api/procure/statistic/find', {
    method: 'POST',
    body
  });
}

export async function updateOne(body) {
  return request('/api/procure/update', {
    method: 'POST',
    body
  });
}

export async function deleteOne(body) {
  return request('/api/procure/delete', {
    method: 'POST',
    body
  });
}

export async function review(body) {
  return request('/api/procure/review', {
    method: 'POST',
    body
  });
}

export async function exportExcel(body) {
  return request('/api/procure/export', {
    method: 'POST',
    body
  });
}

export async function findUsedProcureMaterials(body) {
  return request('/api/procure/material/use/find/many', {
    method: 'POST',
    body
  });
}
export async function findUsedProcureMaterialLots(body) {
  return request('/api/procure/material/use/lot/find/many', {
    method: 'POST',
    body
  });
}

export async function useMaterial(body) {
  return request('/api/procure/material/use', {
    method: 'POST',
    body
  });
}

export async function findMaterialRecordMany(body) {
  return request('/api/procure/material/record/find/many', {
    method: 'POST',
    body
  });
}
export async function findMaterialRecordByOrderCodeMany(body) {
  return request('/api/procure/material/record/findBy/orderCode/many', {
    method: 'POST',
    body
  });
}
export async function findProcureMaterialLot(body) {
  return request('/api/procure/material/lot/find', {
    method: 'POST',
    body
  });
}
export async function updateMaterial(body) {
  return request('/api/procure/material/update', {
    method: 'POST',
    body
  });
}

export async function deleteMaterial(body) {
  return request('/api/procure/material/delete', {
    method: 'POST',
    body
  });
}

export async function procureMaterialLotAssess(body) {
  return request('/api/procure/material/lot/assess', {
    method: 'POST',
    body
  });
}
export async function findReturnOrderMany(body) {
  return request('/api/procure/material/returnOfGoods/find/many', {
    method: 'POST',
    body
  });
}

export async function createReturnGoodsOrder(body) {
  return request('/api/procure/material/returnOfGoods/create', {
    method: 'POST',
    body
  });
}


export async function deleteReturnGoodsOrder(body) {
  return request('/api/procure/material/returnOfGoods/delete', {
    method: 'POST',
    body
  });
}


export async function updateReturnGoodsOrder(body) {
  return request('/api/procure/material/returnOfGoods/update', {
    method: 'POST',
    body
  });
}
